<extend name="Public::innerbase"/>
<block name="content">
<div class="container">
    <div class="page-header">
        <h3>{:isset($info['id'])?'编辑':'新增'}后台菜单</h3>
    </div>
    <form action="{:U()}" method="post" class="form-horizontal">
        <div class="form-group">
            <label class="control-label col-xs-2">标题</label>
            <div class="col-md-4">
                <input type="text" class="form-control" name="title" value="{$info.title|default=''}">
				<span class="help-block">（用于后台显示的配置标题）</span>
            </div>
        </div>
        <div class="form-group">
            <label class="control-label col-xs-2">排序</label>
            <div class="col-md-4">
                <input type="text" class="form-control" name="sort" value="{$info.sort|default=0}" />
				<span class="help-block">（用于分组显示的顺序）</span>
            </div>
        </div>
        <div class="form-group">
            <label class="control-label col-xs-2">链接</label>
            <div class="col-md-4">
                <input type="text" class="form-control" name="url" value="{$info.url|default=''}" />
				<span class="help-block">（U函数解析的URL或者外链）</span>
            </div>
        </div>
        <div class="form-group">
            <label class="control-label col-xs-2">上级菜单</label>
            <div class="col-md-4">
                <select name="pid" class="form-control">
                    <volist name="Menus" id="menu">
                        <option value="{$menu.id}" <?php if($info['pid']==$menu['id'])echo 'selected';?>>{$menu.title_show}</option>
                    </volist>
                </select>
				<span class="help-block">（所属的上级菜单）</span>
            </div>
        </div>
        <div class="form-group">
            <label class="control-label col-xs-2">分组</label>
            <div class="col-md-4">
                <input type="text" class="form-control" name="group" value="{$info.group|default=''}">
            </div>
        </div>
        <div class="form-group">
            <label class="control-label col-xs-2">是否隐藏</label>
            <div class="col-md-4">
                <label class="radio-inline"><input type="radio" name="hide" <?php echo $info['hide']?"checked":"";?> value="1">是</label>
                <label class="radio-inline"><input type="radio" name="hide" <?php echo $info['hide']?"":"checked";?> value="0">否</label>
            </div>
        </div>
        <div class="form-group">
            <label class="control-label col-xs-2">仅开发者模式可见<span class="check-tips"></span></label>
            <div class="col-md-4">
                <label class="radio-inline"><input type="radio" name="is_dev" <?php echo $info['is_dev']?"checked":"";?> value="1">是</label>
                <label class="radio-inline"><input type="radio" <?php echo $info['is_dev']?"":"checked";?> name="is_dev" value="0">否</label>
            </div>
        </div>
        <div class="form-group">
            <label class="control-label col-xs-2">说明</label>
            <div class="col-md-4">
                <input type="text" class="form-control" name="tip" value="{$info.tip|default=''}" />
				<span class="help-block">（菜单详细说明）</span>
            </div>
        </div>
        <div class="form-group">
            <input type="hidden" name="id" value="{$info.id|default=''}">
			<div class="col-xs-offset-2 col-md-6">
				<button class="btn btn-success ajax-post" id="submit" type="submit" target-form="form-horizontal">确 定</button>
				<button class="btn btn-return" onclick="javascript:history.back(-1);return false;">返 回</button>
			</div>
        </div>
    </form>
</div>
</block>
<block name="js">
  
</block>